package com.cskaoyan._02method._03methodcases;

/**
 * @author Macro_Ray
 * @since 2024/3/6 11:37
 */
public class _01Test_10 {
    public static void main(String[] args) {
       /* Scanner sc = new Scanner(System.in);
        System.out.println("请输入想要加密的数字：");
        int number = sc.nextInt();
        //int number = 12345;

        // 求数组的长度
        int temp = number;  // 临时记录number的值
        int count = 0;  // 记录数组长度
        while (number != 0) {
            number = number / 10;
            count++;
        }

        // 定义数组
        int[] arr = new int[count];  // 动态初始化数组，长度是count
        for (int i = 0; i < arr.length; i++) {
            int ge = temp % 10;
            temp = temp / 10;
            arr[i] = ge;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }*/
        // System.out.println(Arrays.toString(arr));
    }
}
